﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Home.Master" Inherits="System.Web.Mvc.ViewPage<PagedList<kysec.RAL.EFToMySql.vw_msg_repmsg>>" %>
<%@ Register src="~/Views/Message/ucleft.ascx" tagname="leftpiece" tagprefix="uc1" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	在线留言-上海众承精密机床有限公司
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<% try{
    string type = Request.QueryString["type"]; %>
    <script type="text/javascript">
        function validator() {
            if ($("#c_vc_company").val() == '' || $("#c_vc_name").val() == '' || $("#c_vc_phone").val() == '' || $("#c_vc_title").val() == ''|| $("#c_ntx_content").val() == '')
            {alert("sdfsdf"); return false; } else {
                return true;
            }
        }

        function submitForm() {
            if (validator()) {
                $.ajax({
                    url: "/Message/AddMsg",
                    type: "post",
                    cache: false,
                    data: "c_vc_title=" + $("#c_vc_title").val() + "&c_vc_company=" + $("#c_vc_company").val() + "&c_vc_name=" + $("#c_vc_name").val() + "&c_ntx_content=" + $("#c_ntx_content").val() + "&c_vc_phone=" + $("#c_vc_phone").val() + "&c_vc_fax=" + $("#c_vc_fax").val() + "&c_vc_emial=" + $("#c_vc_email").val() + "&type=<%=type %>",
                    success: function (result) {
                        if (result == '1') {
                            alert("添加成功");
                            window.location.href = "/Message/Online_Msg?type=<%=type %>";
                        } else if (result == '0') {
                            alert("添加失败!");
                        }
                    }
                });
            } else {
                alert("请填写带有 * 的各项");
            }
        }
    </script>
<div class="ad_show">
    <div class="ad_picture"><%--<img src="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/pre/images/p_06.gif") %>" width="980px" height="100" title="在线留言" /><uc1:leftpiece  runat="server" ID="leftpiece1"/></div>
--%>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="mFlash4" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" 
width="980" height="150"> 
<param name="movie" value="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/pre/flash/3.swf") %>" /> 
<param name="quality" value="high" /> 
<param name="wmode" value="transparent" /> 
<embed id="mFlash3_4" src="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/pre/flash/3.swf") %>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" 
type="application/x-shockwave-flash" width="980" height="150"></embed> 
</object> </div></div>

  <div class="main">
  <div id="main_top_left">
        <div id="main_top_left_top">
	        <div id="choose">
    <%if(type.Equals("1")){ %>
    <img src="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/pre/images/onlineMsg_choose.gif") %>" alt=""  width="190" height="45"/>
    <ul><li><a href="<%=kysec.CR.MyUrl.WebData.WEBURL %>/Message/Online_Msg?type=1">在线留言</a></li></ul>
    <%}
    else if (type.Equals("0"))
    { %>
    <img alt="" src="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/pre/images/jishu_choose.gif") %>" width="190" height="45"/><ul>
		    <li><a href="<%=kysec.CR.MyUrl.WebData.WEBURL %>/Company/Service_Process?type=6">服务流程</a></li><li><a href="<%=kysec.CR.MyUrl.WebData.WEBURL %>/Message/Online_Msg?type=0">客户反馈</a></li></ul>			
    <%} %>
    </div>
	    </div></div>
	    <div id="main_right">
                <div class="MsgList"><img src="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/pre/images/p_07.gif") %>" /></div>
        <div id="page"><%Html.RenderPartial("ucMsgList", Model); %></div>
        <div class="Msg_input"><span><%if (type.Equals("1"))
                                       {%>留言薄<%}
                                       else { %>反馈信息<%} %></span></div>
        <form id="form1" runat="server" enctype="application/x-www-form-urlencoded">
            <div id="Msg"> 
    <table borderColor="#d9d9d9" cellSpacing="1" cellPadding="1" bgColor="#d9d9d9" border="0">
	    <tr>
		    <td bgColor="#ffffff" height="31" width="13%">&nbsp;<font color="#FF0000">*</font> 单  位</td>
		    <td bgColor="#ffffff" height="31" width="83%">
		    <input id="c_vc_company" name="c_vc_company" size="87"/><font id="c_vc_companyTip" color="#FF0000"style="font-size:9px;"></font></td>
	    </tr>
							
	    <tr>
		    <td bgColor="#ffffff" height="31" width="13%">&nbsp;<font color="#FF0000">*
		    </font>姓  名</td>
		    <td bgColor="#ffffff" height="31" width="83%">
		    <input name="c_vc_name" id="c_vc_name" size="87"/><font id="c_vc_nameTip" color="#FF0000"style="font-size:9px;"></font></td>
	    </tr>
							
	    <tr>
		    <td bgColor="#ffffff" height="31" width="13%">&nbsp;<font color="#FF0000">*
		    </font>电  话</td>
		    <td bgColor="#ffffff" height="31" width="83%">
		    <input name="c_vc_phone" id="c_vc_phone" size="87"/><font id="c_vc_phoneTip" color="#FF0000"style="font-size:9px;"></font></td>
	    </tr>
							
	    <tr>
		    <td bgColor="#ffffff" height="31" width="13%">&nbsp;&nbsp;&nbsp;传  真</td>
		    <td bgColor="#ffffff" height="31" width="83%">
		    <input name="c_vc_fax" id="c_vc_fax" size="87"/></td>
	    </tr>
							
	    <tr>
		    <td bgColor="#ffffff" height="31" width="13%">&nbsp;&nbsp;&nbsp;邮  箱</td>
		    <td bgColor="#ffffff" height="31" width="83%">
		    <input name="c_vc_email" id="c_vc_email" size="87"/></td>
	    </tr>
							
	    <tr>
		    <td bgColor="#ffffff" height="31" width="13%">&nbsp;<font color="#FF0000">*
		    </font>主  题</td>
		    <td bgColor="#ffffff" height="31" width="83%">
		    <input   name="c_vc_title" id="c_vc_title" size="87"/><font id="c_vc_titleTip" color="#FF0000"style="font-size:9px;"></font></td>
	    </tr>
							
	    <tr>
		    <td bgColor="#ffffff" height="142" width="13%">&nbsp;<font color="#FF0000">*</font>
		    <%if (Request.QueryString["type"].Equals("1"))
        {%>留　言<%}
        else if (Request.QueryString["type"].Equals("0"))
        { %>反馈信息<%} %></td>
		    <td bgColor="#ffffff" width="83%" height="142">
		    <textarea name="c_ntx_content" id="c_ntx_content" rows="12" cols="55"></textarea><font id="c_vc_contentTip" color="#FF0000"style="font-size:9px;"></font></td>
	    </tr>
							
	    <tr>
		    <td bgColor="#ffffff" colspan="2">
		    <input name="submit"  type="button" onclick="submitForm()" value="提 交">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		    &nbsp;&nbsp;<input  name="reset"  type="reset"  value="重 写"></td>
	    </tr>
							
				    </table>
    </div>
        </form>
    </div>
  </div>
    <%}catch(Exception ex)
   {
      ex.ToString();
   } %>
</asp:Content>

